import http from "@/utils/http";

export function addAddressAPI(data) {
  return http({
    url: "/member/address",
    method: "post",
    data,
  });
}

export function getAddressAPI() {
  return http({
    url: "/member/address",
  });
}

export function getAddressDetailAPI(id) {
  return http({
    url: "/member/address/" + id,
  });
}

export function editAddressAPI (id,data){
  return http({
    url:`/member/address/${id}`,
    method:'put',
    data
  })
}

export function delAddressAPI(id){
  return http({
    url:`/member/address/${id}`,
    method:'delete'
  })
}